<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.6 [en] (X11; I; Linux 2.2.5-15 i586) [Netscape]">
   <title>Running the simulation</title>
</head>
<body>

<h1>
<a href="http://pagina.de.la.scoala"><img SRC="images/vIDE.gif" ALT="The official vIDE page at PUB" NOSAVE height=45 width=105 align=CENTER></a>Running
the simulation</h1>
You can run a simulation in two ways:
<ul>
<li>
From inside the IDE, by creating a <a href="projects.html">project</a>
as described earlier and using the simulation buttons from the toolbar.</li>

<li>
At the command line, by directly invoking the simulator.</li>
</ul>

<h2>
1 Running the simulation inside the IDE</h2>
After creating the project, you can start the simulator by clicking on
the&nbsp;<img SRC="../images/run.gif" NOSAVE BORDER=1 height=17 width=17>
button. This will first start the syntactic analyzer which will check the
entire project and will print error messages as it finds anything wrong
(for this implementation, only the first error is reported). You can go
right to the place where the problem was found by clicking on the error
message.
<p>When everything is syntactically OK, the simulation gets started. By
default, the interpreter enters into step-by-step mode, so only one instruction
will be executed. You can use the toolbar buttons to execute the code or,
alternatively, enter the commands by hand using the input line at the bottom
of the window. You can find the available command list in the chapter Running
the simulation from the command line.
<p>All the messages generated by <tt>$display</tt> and other diagnose tasks
are displayed into the console.
<h3>
1.1 Using the watch</h3>
When running the simulation inside the IDE, you can browse the Watch window.
It consists of a tree which contains all the module instances (and the
enclosed namespaces, such as tasks, functions, named blocks, etc.) inside
your project and their data with the actual values. The format is implicit
the complete (sign, size, etc.) binary format.
<h3>
1.2 Using the waveform viewer</h3>
The Waveform Viewer window can be activated by clicking the&nbsp;<img SRC="../images/waveFrame.gif" NOSAVE BORDER=1 height=17 width=17>
button on the toolbar. You can add variables from the watch by clicking
the desired name in the Watch.
<h2>
2 Running the simulation from the command line</h2>
The watch&amp;waveform visualisation facilities are not available in this
mode.
<h3>
2.1 Invocation</h3>
The synopsis for the engine invocation is:
<p><b>rv</b> [<b>-dhspl</b>] [<b>-o</b> &lt;precompiled_dir>[:&lt;precompiled_dir>]]
[<b>--version</b>] &lt;verilog_files>
<p><b>Options description:</b>
<ul>
<li>
<b>d</b> and <b>p</b> : Prints lots of debugging info. Inserted here only
for documentation purposes. Use it only if something goes wrong and want
to fill us a bug report (<b>please</b> send us bug reports !).</li>

<li>
<b>s</b> : Enters step-by-step mode after initialization.</li>

<li>
<b>h</b> : Prints a brief help text.</li>

<li>
<b>o</b> : (currently unimplemented ;) Specifies additional directories
for precompiled modules. Default directories are the current working dir
and the vIDE standard library directory (called <tt>objects</tt>).</li>

<li>
<b>--version</b> : Prints version&amp;copyright and exits.</li>
</ul>

<h3>
2.2 Console commands</h3>
<b>The console commands are:</b>
<ul>
<li>
<b>help</b> : Prints a list with the available commands.</li>

<li>
<b>step</b> : Executes one instruction.</li>

<li>
<b>unit</b> : Executes all the instructions remaining for the current time
unit.</li>

<li>
<b>go</b> : Continuously executes all the remaining instructions until
the end of the simulation is reached.</li>

<li>
<b>debug</b> : Toggles on/off the "print debug info" mode. It is inserted
here only for documentation purposes, and should be used only for bug reports..</li>

<li>
<b>traceon / traceoff</b> : Enables/disables instruction tracing.</li>

<li>
<b>exit</b> : Exits the simulator.</li>
</ul>
Note that the commands are matched by the first letters, and if the given
ones do not uniquely identify a command, the first matched one is assumed
(but we try to choose words which start with different letters, so only
the initial should suffice in most cases :).
<br><a href="toc.html"><img SRC="images/back.gif" NOSAVE BORDER=0 NATURALSIZEFLAG="3" height=22 width=42 align=BOTTOM></a>
</body>
</html>
